package com.example.mardan_demo1.mapper;

import com.example.mardan_demo1.pojo.SearchList;
import com.example.mardan_demo1.pojo.Yaopin;

import com.example.mardan_demo1.pojo.hzp.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface YaopinMapper {
    // 新增药品
    void add(Yaopin yaopin);
    // 获取药品列表
    List<Yaopin> list(Integer userId, String yangPinMingCheng);

    List<SearchList> houxuanlist(String name, String jianPinLeiBie);

    List<SearchList> getJianYanXiangMuByJianPinId(String jianPinDengJiId);

    void hzpFenLeiAdd(HuaZhuangPinFenLei fenlei);

    List<HuaZhuangPinFenLei> hzpFenLeiList();

    void hzpXiangMuAdd(HuaZhuangPinJianYanXiangMu jianYanXiangMu);

    List<HuaZhuangPinJianYanXiangMu> hzpXiangMuList(String xiangMuMingCheng);

    HuaZhuangPinJianYanXiangMu findXiangMuById(Integer xiangMuId);

    List<HuaZhuangPinFenLei> findfenLeisByIds(Integer[] leiBieIds);

    void xinZengGuanLian(Integer xiangMuId, Integer leiBieId);

    GuanLianFenLeiHeXiangMu findGuanLianByXiangMuIdAndLeiBieId(Integer xiangMuId, Integer leiBieId);

    List<XiangMuDTO> hzpXiangMuListWithDalei(String xiangMuMingCheng);

    List<GuanLianFenLeiHeXiangMu> getGuanLianFenLeiByXiangMuId(Integer xiangMuId);

    void shanChuGuanLianByXiangMuId(Integer xiangMuId);

    List<HuaZhuangPinJianYanXiangMu> hzpGetXiangMuListByDaleiId(Integer fenLeiId);

    Integer hzpXinZengYangPin(HzpInfo hzpInfo);

    void xinZengHzpChuLiRiZhi(Integer xinZengYangPinId, Integer userId, String caoZuoLeiXing, String chuLiYiJian,String yangPinLeiXing);

    List<HzpInfo> khGetHzpList(String yangPinMingCheng, Integer userId);

    List<HzpInfo> adminGetHzpList(String yangPinMingCheng);

    HzpInfo adminGetHzpDetailById(Integer id);

    List<HuaZhuangPinJianYanXiangMu> adminGetHzpXiangMuByIds(int[] ids);

    void kehuUpdateHzpInfo(HzpInfo hzpInfo);

    void adminShouLiHzp(Integer yangPinId, String caoZuoLeiXing, String chuLiYiJian, String yongHuId, String yangPinLeiXing);

    List<HzpJinDu> getHzpJinDuById(Integer id);

    HzpInfo findHzpInfoById(Integer yangPinId);

    void addHzpProcessLog(ProcessLogs log);

    void addYaoPinProcessLog(ProcessLogs log);
    void addQiXieProcessLog(ProcessLogs log);

    List<HzpJinDu> getYaoPinProcessLogsById(Integer yangPinId);
}
